#ifndef PHYSICSENGINE_HH_
# define PHYSICSENGINE_HH_

// need templates

// need bounce

// is function of environement (under water, ...)

// cd split: generic, guns, explosions, ...


/** content: all usefull physics formulas
 ** is a singleton
 */
class PhysicsEngine
{
public:
  PhysicsEngine getInstance();

  ~PhysicsEngine(); // TODO: check shd be public 4 a singleton ?

  /** apply gravity on the Object \param o
   ** \param o: the Object we'll calc gravity on
   ** \return new \param Object velocity
   */
  float applyGravity(Object o);


  /** W = m g // Weight = mass x g [9.80665]
  ** \return weight (in Newtons) of the parameter
  ** \param Item or Character: item or character of which we'll calc weight
  */
  float calcWeight(Item i);

  /** here, we use character global weight, including stuff weight
   */
  float calcWeight(Character c);

  float inertia(Item i);

  // kinetic energy E = 0.5 m v²
  float impactStrength(mass m, velocity v);

  /** where does the Object will hit sumthin
   ** includes gesture of:
   **   gravity, rotation
   */
  Vector3 impactPlace(Object o, velocity v, direction d);



private:
  PhysicsEngine(); // private Ctor: singleton
};

#endif /* !PHYSICSENGINE_HH_ */
